package com.demo.search.annotation;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * 注解
 * @author ryuu.kk
 *
 */
@Target(ElementType.TYPE)
@Retention(RetentionPolicy.RUNTIME)
public @interface Searchable {

	/**
	 * 类别名
	 * @return String
	 */
    String alias() default "";

    /**
     * Boost 级别
     * @return float
     */
    float boost() default 1.0f;

    /**
     * Defines if the searchable class is a root class. A root class is a top
     * level searchable class. You should define the searchable class with <code>false</code>
     * if it only acts as mapping definitions for a {@link SearchableComponent}.
     */
    boolean root() default true;

    /**
     * A list of aliases to extend. Extending the aliases allows to include other
     * mapping definitions, defined via annotations or xml.
     * <p/>
     * Remember, that the searchable class will already include all the annotations
     * in it's super class or interface (recursivly). So there is no need to specify
     * them in {@link #extend()}. Note, that xml mapping code>contract</code>s can
     * be extended as well.
     */
    String[] extend() default {};
}
